# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Lukasz Pozarlik <lpozarlik@gmail.com>

pkgname=python-igraph
pkgver=0.10.4
pkgrel=2
url='https://igraph.org/python/'
license=(GPL)
arch=(loong64 x86_64)
pkgdesc='Python bindings for the igraph library'
depends=(python-texttable igraph)
makedepends=(python-setuptools)
source=(python-igraph-$pkgver::https://files.pythonhosted.org/packages/source/i/igraph/igraph-$pkgver.tar.gz)
sha256sums=('4786e05919ee93f6479fe8ca697d68537edfe47549ed09dfb33bda4daced1fb9')

build() {
  cd igraph-$pkgver
  python setup.py build --use-pkg-config
}

check() {
  cd igraph-$pkgver
  PYTHONPATH="$PWD"/`ls -d build/lib.*` python -m unittest
}

package() {
  cd igraph-$pkgver
  python setup.py install --skip-build --root="$pkgdir" --optimize=1 
}
